package org.tcx.core.db.bean;

import java.io.Serializable;
import java.util.Date;

@SuppressWarnings("serial")
public class TestCase implements Serializable, Comparable<TestCase>{
	private Long id;
	private int version = 0;
	private String precondition;
	private String operation;
	private String expectedresult;
	private Date created = new Date();
	
	public Long getId() {
		return id;
	}

	@SuppressWarnings("unused")
	private void setId(Long id) {
		this.id = id;
	}

	public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	public String getPrecondition() {
		return precondition;
	}

	public void setPrecondition(String precondition) {
		this.precondition = precondition;
	}

	public String getOperation() {
		return operation;
	}

	public void setOperation(String operation) {
		this.operation = operation;
	}

	public Date getCreated() {
		return created;
	}

	public void setCreated(Date created) {
		this.created = created;
	}
	public String getExpectedresult() {
		return expectedresult;
	}

	public void setExpectedresult(String expectedresult) {
		this.expectedresult = expectedresult;
	}
	public int compareTo(TestCase o) {
		// Don't compare Date objects! Use the time in milliseconds!
		return Long.valueOf(this.getCreated().getTime()).compareTo(
				Long.valueOf(o.getCreated().getTime()));
	}
}
